import { RouteRecordRaw, RouterView } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/auth-manage',
    meta: { auth: ['auth-manage'] },
    component: RouterView,
    redirect: '/auth-manage/online-service',
    children: [
      {
        path: '/auth-manage/online-service',
        meta: { auth: ['auth-manage'] },
        component: RouterView,
        redirect: '/auth-manage/online-service/list',
        children: [
          {
            path: '/auth-manage/online-service/list',
            meta: { auth: ['auth-manage'] },
            component: () => import('@/views/admin/auth-manage/online-service/list.vue')
          },
          {
            path: '/auth-manage/online-service/detail',
            meta: { auth: ['auth-manage'] },
            component: () => import('@/views/admin/auth-manage/online-service/detail.vue')
          }
        ]
      },
      {
        path: '/auth-manage/serial-number',
        meta: { auth: ['auth-manage'] },
        component: RouterView,
        redirect: '/auth-manage/serial-number/list',
        children: [
          {
            path: '/auth-manage/serial-number/list',
            meta: { auth: ['auth-manage'] },
            component: () => import('@/views/admin/auth-manage/serial-number/list.vue')
          },
          {
            path: '/auth-manage/serial-number/detail',
            meta: { auth: ['auth-manage'] },
            component: () => import('@/views/admin/auth-manage/serial-number/detail.vue')
          }
        ]
      },
      {
        path: '/auth-manage/license',
        meta: { auth: ['auth-manage'] },
        component: RouterView,
        redirect: '/auth-manage/license/list',
        children: [
          {
            path: '/auth-manage/license/list',
            meta: { auth: ['auth-manage'] },
            component: () => import('@/views/admin/auth-manage/license/list.vue')
          },
          {
            path: '/auth-manage/license/detail',
            meta: { auth: ['auth-manage'] },
            component: () => import('@/views/admin/auth-manage/license/detail.vue')
          }
        ]
      }
    ]
  }
]

export default routes
